package com.zjut.service.impl;

import com.zjut.domain.Chapter;
import com.zjut.domain.Paper;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface ChapterServiceImpl {
    /**
     * 保存
     * @param chapter
     * @return
     */
    boolean save(Chapter chapter);

    /**
     * 修改
     * @param chapter
     * @return
     */
    boolean update(Chapter chapter);

    /**
     * 按id删除
     * @param id
     * @return
     */
    boolean delete(Integer id);

    /**
     * 按id查询
     * @param id
     * @return
     */
    Chapter getById(Integer id);

    /**
     * 查询全部
     * @return
     */
    List<Chapter> getAll();

    List<Chapter> getChapter(Paper paper);

    String getKnowledge(int chapter ,int section);

    char getRequirement(int chapter ,int section);
}
